﻿<%@ Page Title="" Language="c#" MasterPageFile="~/web/common/common.master" AutoEventWireup="true"
    CodeBehind="index.aspx.cs" Inherits="shop.index" %>

<asp:Content ID="content1" ContentPlaceHolderID="head" runat="server">
    <title>装饰物首页</title>
    <link href="web/resource/swiper/css/swiper.min.css" rel="stylesheet" />
    <%--<link href="web/css/index.css" rel="stylesheet" />--%>
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="contentplaceholder1" runat="server">
    <div class="layui-container">
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <%foreach (var goods in carouselGoodsList)
                  {
                %>
                <div class="swiper-slide">
                    <a href="/web/view/GoodDetail.aspx?id=<%=goods.Id %>">
                        <img src="/web/resource/img<%=goods.Image.ImagePath %>" class="carousel-img" /></a>
                </div>
                <%
                    }
                %>
            </div>
            <!-- 如果需要分页器 -->
            <div class="swiper-pagination">
            </div>
            <!-- 如果需要导航按钮 -->
            <div class="swiper-button-prev">
            </div>
            <div class="swiper-button-next">
            </div>
            <!-- 如果需要滚动条 -->
            <div class="swiper-scrollbar">
            </div>
        </div>
        <div class="layui-row ">
            <div class="layui-bg-red layui-field-box">
                热门珠宝
            </div>
            <%foreach (var goods in jewelryGoodsList)
              {
            %>
            <div class="layui-col-md3 layui-col-xs6 layui-col-sm6">
                <div class="goods-item">
                    <div class="content">
                        <a href="/web/view/GoodDetail.aspx?id=<%=goods.Id %>">
                            <img src="web/resource/img<%=goods.Image.ImagePath %>" /></a>
                    </div>
                    <div class="description">
                        <%=goods.Name %></div>
                    <div class="data">
                        价格 <span class="price">
                            <%=goods.Price %></span>元
                    </div>
                    <div class="mask">
                    </div>
                </div>
            </div>
            <%
                }
            %>
        </div>

                <div class="layui-row ">
            <div class="layui-bg-red layui-field-box">
                热门礼物
            </div>
            <%foreach (var goods in  giftGoodsList)
              {
            %>
            <div class="layui-col-md3 layui-col-xs6 layui-col-sm6">
                <div class="goods-item">
                    <div class="content">
                        <a href="/web/view/GoodDetail.aspx?id=<%=goods.Id %>">
                            <img src="web/resource/img<%=goods.Image.ImagePath %>" /></a>
                    </div>
                    <div class="description">
                        <%=goods.Name %></div>
                    <div class="data">
                        价格 <span class="price">
                            <%=goods.Price %></span>元
                    </div>
                    <div class="mask">
                    </div>
                </div>
            </div>
            <%
                }
            %>
        </div>

        <div class="layui-row ">
            <div class="layui-bg-red layui-field-box">
                家具装饰</div>
            <%foreach (var goods in furnitureGoodsList)
              {
            %>
            <div class="layui-col-md3 layui-col-xs6 layui-col-sm6">
                <div class="goods-item">
                    <div class="content">
                        <a href="/web/view/GoodDetail.aspx?id=<%=goods.Id %>">
                            <img src="web/resource/img<%=goods.Image.ImagePath %>" /></a>
                    </div>
                    <div class="description">
                        <%=goods.Name %></div>
                    <div class="data">
                        价格 <span class="price">
                            <%=goods.Price %></span>元
                    </div>
                    <div class="mask">
                    </div>
                </div>
            </div>
            <%
                }
            %>
        </div>
        <div class="layui-row ">
            <div class="layui-bg-red layui-field-box goods-list">
                房屋装饰</div>
            <%foreach (var goods in homeDecoGoodsList)
              {
            %>
            <div class="layui-col-md3 layui-col-xs6 layui-col-sm6">
                <div class="goods-item">
                    <div class="content">
                        <a href="/web/view/GoodDetail.aspx?id=<%=goods.Id %>">
                            <img src="web/resource/img<%=goods.Image.ImagePath %>" /></a>
                    </div>
                    <div class="description">
                        <%=goods.Name %></div>
                    <div class="data">
                        价格 <span class="price">
                            <%=goods.Price %></span>元
                    </div>
                    <div class="mask">
                    </div>
                </div>
            </div>
            <%
                }
            %>
        </div>
        <div class="layui-row ">
            <div class="layui-bg-red layui-field-box">
                文艺作品</div>
            <%foreach (var goods in artGoodsList)
              {
            %>
            <div class="layui-col-md3 layui-col-xs6 layui-col-sm6">
                <div class="goods-item">
                    <div class="content">
                        <a href="/web/view/GoodDetail.aspx?id=<%=goods.Id %>">
                            <img src="web/resource/img<%=goods.Image.ImagePath %>" />
                        </a>
                    </div>
                    <div class="description">
                        <%=goods.Name %></div>
                    <div class="data">
                        价格 <span class="price">
                            <%=goods.Price %></span>元
                    </div>
                    <div class="mask">
                    </div>
                </div>
            </div>
            <%
                }
            %>
        </div>
    </div>
    <script src="web/resource/swiper/js/swiper.min.js"></script>
    <script>

        var mySwiper = new Swiper('.swiper-container', {
            preventLinksPropagation: false,
            preventClicks: false,//默认true
            autoplay: {
                delay: 2000,
                stopOnLastSlide: false,
                disableOnInteraction: false,
            },
            loop: true,

            // 如果需要分页器
            pagination: {
                el: '.swiper-pagination',
                clickable: true,
            },

            // 如果需要前进后退按钮
            navigation: {
                nextEl: '.swiper-button-next',
                prevEl: '.swiper-button-prev',
            },

            // 如果需要滚动条
            scrollbar: {
                el: '.swiper-scrollbar',
                draggable: true,
            },
        })
    </script>
</asp:Content>
